#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int years(int a)
{
	
	return  (a % 4 == 0);

}
int main()
{
	
	for (int i = 2024; i <=3000; i++)
	{
		if (years(i))
			printf("%d ", i);
	}
	
	return 0;
}